class GetChapterModel {
  String name;
  String chineseName;
  String order;
  String textbook;
  List<Sections> sections;
  String id;

  GetChapterModel(
      {this.name,
      this.chineseName,
      this.order,
      this.textbook,
      this.sections,
      this.id});

  GetChapterModel.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    chineseName = json['chinese_name'];
    order = json['order'];
    textbook = json['textbook'];
    if (json['sections'] != null) {
      sections = new List<Sections>();
      json['sections'].forEach((v) {
        sections.add(new Sections.fromJson(v));
      });
    }
    id = json['id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['chinese_name'] = this.chineseName;
    data['order'] = this.order;
    data['textbook'] = this.textbook;
    if (this.sections != null) {
      data['sections'] = this.sections.map((v) => v.toJson()).toList();
    }
    data['id'] = this.id;
    return data;
  }
}

class Sections {
  String name;
  String chineseName;
  String order;
  String chapter;
  String nodesList;
  String id;

  Sections(
      {this.name,
      this.chineseName,
      this.order,
      this.chapter,
      this.nodesList,
      this.id});

  Sections.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    chineseName = json['chinese_name'];
    order = json['order'];
    chapter = json['chapter'];
    nodesList = json['nodes_list'];

    id = json['id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['chinese_name'] = this.chineseName;
    data['order'] = this.order;
    data['chapter'] = this.chapter;
    data['nodes_list'] = this.nodesList;
    data['id'] = this.id;
    return data;
  }
}

class ChapteModel {
  String name;
  String chineseName;
  String order;
  String id;
//  是否展示
  bool choice;
  //是否选中
  bool select;


  ChapteModel({this.name, this.chineseName, this.order, this.id,this.choice,this.select});
}
